import {Component, OnInit} from '@angular/core';
import {Router} from '@angular/router';

@Component({
  selector: 'app-order-list',
  templateUrl: './order-list.component.html',
  styleUrls: ['./order-list.component.less']
})
export class OrderListComponent implements OnInit {

  constructor(
    private router: Router) {
  }

  ngOnInit() {
  }

  toUpdateComponent() {
    const data = {'name': '张三', 'age': 40};
    this.router.navigate(['/orders/order-edit'], {
      skipLocationChange: true,
      queryParams: {
        info: JSON.stringify(data)
      }
    });
  }

}
